<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <title>标准详情</title>

    <link rel="stylesheet" href="${ctx}/static/styles/tagging.css" type="text/css">
    <script src="${ctx}/static/js/pdfobject.min.js"></script>

    <c:if test="${!empty exists}">
        <script>
            document.onreadystatechange = function () {
                if (document.readyState == "complete") {
                    PDFObject.embed("${ctx}/resource/docs/${std.catStd}/${std.pdfPath}", "#ex");
                }
            }
        </script>
    </c:if>
</head>

<body>
<div class="main">
    <form action="${ctx}/annotate" method="post" id="annotate-form">
        <div class="container">
            <h3 class="tag-title">文本标注</h3>
            <input type="hidden" name="id" value="${std.id}">
            <div class="tag-main">
                <textarea id="tag-area" name="textOcr">${std.textOcr}</textarea>
                <div id="tag-analog">

                </div>
            </div>
            <div class="btn-area">
                <button type="submit" class="btn btn-primary">提交</button>
            </div>
        </div>
    </form>
</div>
<div class="tag-toolbar">
    <a href="#" class="tag-fun" title="tag-fun1">功能1</a>
    <a href="#">功能2</a>
    <a href="#">功能3</a>
    <a href="#">功能4</a>
    <a href="#" class="tag-clear">清除标记</a>
</div>

<div class="tip-modal">
    <div class="tip-modal-main">
        <a href="#" class="tip-modal-close"></a>
        <div class="tip-modal-title">
            温馨提示
        </div>
        <div class="tip-modal-body">
            对不起，当前功能仅限在谷歌浏览器下使用。如已安装谷歌浏览器，点击"取消"按钮；若未安装，点击"下载"按钮安装最新版谷歌浏览器。
        </div>
        <div class="tip-modal-footer">
            <a href="#" class="tip-modal-cancel">取消</a>
            <a href="http://www.google.cn/intl/zh-CN/chrome/browser/" class="tip-modal-down">点击下载</a>
        </div>
    </div>
</div>
<script src="${ctx}/static/js/tagging.js" type="text/javascript"></script>
<script src="${ctx}/static/js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
    var userAgent = navigator.userAgent;
    if (userAgent.indexOf("Chrome") == -1) {
        $(".tip-modal").show();
    }

    $(".tip-modal-cancel,.tip-modal-close").click(function () {
        $(".tip-modal").hide();
    })

    $("#annotate-form").ajaxForm({
        success: function () {
            alert("保存成功");
        }
    });
</script>
</body>
</html>
